<html><body>
<style>

body, h1, h2, h3, div, span, p, pre, a {
  margin: 0;
  padding: 0;
  border: 0;
  font-weight: inherit;
  font-style: inherit;
  font-size: 100%;
  font-family: inherit;
  vertical-align: baseline;
}

body {
  font-size: 13px;
  padding: 1em;
}

h1 {
  font-size: 26px;
  margin-bottom: 1em;
}

h2 {
  font-size: 24px;
  margin-bottom: 1em;
}

h3 {
  font-size: 20px;
  margin-bottom: 1em;
  margin-top: 1em;
}

pre, code {
  line-height: 1.5;
  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}

pre {
  margin-top: 0.5em;
}

h1, h2, h3, p {
  font-family: Arial, sans serif;
}

h1, h2, h3 {
  border-bottom: solid #CCC 1px;
}

.toc_element {
  margin-top: 0.5em;
}

.firstline {
  margin-left: 2 em;
}

.method  {
  margin-top: 1em;
  border: solid 1px #CCC;
  padding: 1em;
  background: #EEE;
}

.details {
  font-weight: bold;
  font-size: 14px;
}

</style>

<h1><a href="monitoring_v3.html">Cloud Monitoring API</a> . <a href="monitoring_v3.projects.html">projects</a> . <a href="monitoring_v3.projects.alerts.html">alerts</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
  <code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<p class="toc_element">
  <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
<p class="firstline">Gets a single alert.</p>
<p class="toc_element">
  <code><a href="#list">list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
<p class="firstline">Lists the existing alerts for the metrics scope of the project.</p>
<p class="toc_element">
  <code><a href="#list_next">list_next()</a></code></p>
<p class="firstline">Retrieves the next page of results.</p>
<h3>Method Details</h3>
<div class="method">
    <code class="details" id="close">close()</code>
  <pre>Close httplib2 connections.</pre>
</div>

<div class="method">
    <code class="details" id="get">get(name, x__xgafv=None)</code>
  <pre>Gets a single alert.

Args:
  name: string, Required. The name of the alert.The format is: projects/[PROJECT_ID_OR_NUMBER]/alerts/[ALERT_ID] The [ALERT_ID] is a system-assigned unique identifier for the alert. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # An alert is the representation of a violation of an alert policy. It is a read-only resource that cannot be modified by the accompanied API.
  &quot;closeTime&quot;: &quot;A String&quot;, # The time when the alert was closed.
  &quot;log&quot;: { # Information about the log for log-based alerts. # The log information associated with the alert. This field is only populated for log-based alerts.
    &quot;extractedLabels&quot;: { # The labels extracted from the log.
      &quot;a_key&quot;: &quot;A String&quot;,
    },
  },
  &quot;metadata&quot;: { # Auxiliary metadata for a MonitoredResource object. MonitoredResource objects contain the minimum set of information to uniquely identify a monitored resource instance. There is some other useful auxiliary metadata. Monitoring and Logging use an ingestion pipeline to extract metadata for cloud resources of all types, and store the metadata in this message. # The metadata of the monitored resource.
    &quot;systemLabels&quot;: { # Output only. Values for predefined system metadata labels. System labels are a kind of metadata extracted by Google, including &quot;machine_image&quot;, &quot;vpc&quot;, &quot;subnet_id&quot;, &quot;security_group&quot;, &quot;name&quot;, etc. System label values can be only strings, Boolean values, or a list of strings. For example: { &quot;name&quot;: &quot;my-test-instance&quot;, &quot;security_group&quot;: [&quot;a&quot;, &quot;b&quot;, &quot;c&quot;], &quot;spot_instance&quot;: false }
      &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
    },
    &quot;userLabels&quot;: { # Output only. A map of user-defined metadata labels.
      &quot;a_key&quot;: &quot;A String&quot;,
    },
  },
  &quot;metric&quot;: { # A specific metric, identified by specifying values for all of the labels of a MetricDescriptor. # The metric type and any metric labels preserved from the incident&#x27;s generating condition.
    &quot;labels&quot;: { # The set of label values that uniquely identify this metric. All labels listed in the MetricDescriptor must be assigned values.
      &quot;a_key&quot;: &quot;A String&quot;,
    },
    &quot;type&quot;: &quot;A String&quot;, # An existing metric type, see google.api.MetricDescriptor. For example, custom.googleapis.com/invoice/paid/amount.
  },
  &quot;name&quot;: &quot;A String&quot;, # Identifier. The name of the alert.The format is: projects/[PROJECT_ID_OR_NUMBER]/alerts/[ALERT_ID] The [ALERT_ID] is a system-assigned unique identifier for the alert.
  &quot;openTime&quot;: &quot;A String&quot;, # The time when the alert was opened.
  &quot;policy&quot;: { # The state of the policy at the time the alert was generated. # The snapshot of the alert policy that generated this alert.
    &quot;displayName&quot;: &quot;A String&quot;, # The display name of the alert policy.
    &quot;name&quot;: &quot;A String&quot;, # The name of the alert policy resource. In the form of &quot;projects/PROJECT_ID_OR_NUMBER/alertPolicies/ALERT_POLICY_ID&quot;.
    &quot;severity&quot;: &quot;A String&quot;, # The severity of the alert policy.
    &quot;userLabels&quot;: { # The user labels for the alert policy.
      &quot;a_key&quot;: &quot;A String&quot;,
    },
  },
  &quot;resource&quot;: { # An object representing a resource that can be used for monitoring, logging, billing, or other purposes. Examples include virtual machine instances, databases, and storage devices such as disks. The type field identifies a MonitoredResourceDescriptor object that describes the resource&#x27;s schema. Information in the labels field identifies the actual resource and its attributes according to the schema. For example, a particular Compute Engine VM instance could be represented by the following object, because the MonitoredResourceDescriptor for &quot;gce_instance&quot; has labels &quot;project_id&quot;, &quot;instance_id&quot; and &quot;zone&quot;: { &quot;type&quot;: &quot;gce_instance&quot;, &quot;labels&quot;: { &quot;project_id&quot;: &quot;my-project&quot;, &quot;instance_id&quot;: &quot;12345678901234&quot;, &quot;zone&quot;: &quot;us-central1-a&quot; }} # The monitored resource type and any monitored resource labels preserved from the incident&#x27;s generating condition.
    &quot;labels&quot;: { # Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Compute Engine VM instances use the labels &quot;project_id&quot;, &quot;instance_id&quot;, and &quot;zone&quot;.
      &quot;a_key&quot;: &quot;A String&quot;,
    },
    &quot;type&quot;: &quot;A String&quot;, # Required. The monitored resource type. This field must match the type field of a MonitoredResourceDescriptor object. For example, the type of a Compute Engine VM instance is gce_instance. For a list of types, see Monitoring resource types (https://cloud.google.com/monitoring/api/resources) and Logging resource types (https://cloud.google.com/logging/docs/api/v2/resource-list).
  },
  &quot;state&quot;: &quot;A String&quot;, # Output only. The current state of the alert.
}</pre>
</div>

<div class="method">
    <code class="details" id="list">list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)</code>
  <pre>Lists the existing alerts for the metrics scope of the project.

Args:
  parent: string, Required. The name of the project to list alerts for. (required)
  filter: string, Optional. An alert is returned if there is a match on any fields belonging to the alert or its subfields.
  orderBy: string, Optional. A comma-separated list of fields in Alert to use for sorting. The default sort direction is ascending. To specify descending order for a field, add a desc modifier. The following fields are supported: open_time close_timeFor example, close_time desc, open_time will return the alerts closed most recently, with ties broken in the order of older alerts listed first.If the field is not set, the results are sorted by open_time desc.
  pageSize: integer, Optional. The maximum number of results to return in a single response. If not set to a positive number, at most 50 alerts will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
  pageToken: string, Optional. If non-empty, page_token must contain a value returned as the next_page_token in a previous response to request the next set of results.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # The ListAlerts response.
  &quot;alerts&quot;: [ # The list of alerts.
    { # An alert is the representation of a violation of an alert policy. It is a read-only resource that cannot be modified by the accompanied API.
      &quot;closeTime&quot;: &quot;A String&quot;, # The time when the alert was closed.
      &quot;log&quot;: { # Information about the log for log-based alerts. # The log information associated with the alert. This field is only populated for log-based alerts.
        &quot;extractedLabels&quot;: { # The labels extracted from the log.
          &quot;a_key&quot;: &quot;A String&quot;,
        },
      },
      &quot;metadata&quot;: { # Auxiliary metadata for a MonitoredResource object. MonitoredResource objects contain the minimum set of information to uniquely identify a monitored resource instance. There is some other useful auxiliary metadata. Monitoring and Logging use an ingestion pipeline to extract metadata for cloud resources of all types, and store the metadata in this message. # The metadata of the monitored resource.
        &quot;systemLabels&quot;: { # Output only. Values for predefined system metadata labels. System labels are a kind of metadata extracted by Google, including &quot;machine_image&quot;, &quot;vpc&quot;, &quot;subnet_id&quot;, &quot;security_group&quot;, &quot;name&quot;, etc. System label values can be only strings, Boolean values, or a list of strings. For example: { &quot;name&quot;: &quot;my-test-instance&quot;, &quot;security_group&quot;: [&quot;a&quot;, &quot;b&quot;, &quot;c&quot;], &quot;spot_instance&quot;: false }
          &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
        },
        &quot;userLabels&quot;: { # Output only. A map of user-defined metadata labels.
          &quot;a_key&quot;: &quot;A String&quot;,
        },
      },
      &quot;metric&quot;: { # A specific metric, identified by specifying values for all of the labels of a MetricDescriptor. # The metric type and any metric labels preserved from the incident&#x27;s generating condition.
        &quot;labels&quot;: { # The set of label values that uniquely identify this metric. All labels listed in the MetricDescriptor must be assigned values.
          &quot;a_key&quot;: &quot;A String&quot;,
        },
        &quot;type&quot;: &quot;A String&quot;, # An existing metric type, see google.api.MetricDescriptor. For example, custom.googleapis.com/invoice/paid/amount.
      },
      &quot;name&quot;: &quot;A String&quot;, # Identifier. The name of the alert.The format is: projects/[PROJECT_ID_OR_NUMBER]/alerts/[ALERT_ID] The [ALERT_ID] is a system-assigned unique identifier for the alert.
      &quot;openTime&quot;: &quot;A String&quot;, # The time when the alert was opened.
      &quot;policy&quot;: { # The state of the policy at the time the alert was generated. # The snapshot of the alert policy that generated this alert.
        &quot;displayName&quot;: &quot;A String&quot;, # The display name of the alert policy.
        &quot;name&quot;: &quot;A String&quot;, # The name of the alert policy resource. In the form of &quot;projects/PROJECT_ID_OR_NUMBER/alertPolicies/ALERT_POLICY_ID&quot;.
        &quot;severity&quot;: &quot;A String&quot;, # The severity of the alert policy.
        &quot;userLabels&quot;: { # The user labels for the alert policy.
          &quot;a_key&quot;: &quot;A String&quot;,
        },
      },
      &quot;resource&quot;: { # An object representing a resource that can be used for monitoring, logging, billing, or other purposes. Examples include virtual machine instances, databases, and storage devices such as disks. The type field identifies a MonitoredResourceDescriptor object that describes the resource&#x27;s schema. Information in the labels field identifies the actual resource and its attributes according to the schema. For example, a particular Compute Engine VM instance could be represented by the following object, because the MonitoredResourceDescriptor for &quot;gce_instance&quot; has labels &quot;project_id&quot;, &quot;instance_id&quot; and &quot;zone&quot;: { &quot;type&quot;: &quot;gce_instance&quot;, &quot;labels&quot;: { &quot;project_id&quot;: &quot;my-project&quot;, &quot;instance_id&quot;: &quot;12345678901234&quot;, &quot;zone&quot;: &quot;us-central1-a&quot; }} # The monitored resource type and any monitored resource labels preserved from the incident&#x27;s generating condition.
        &quot;labels&quot;: { # Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Compute Engine VM instances use the labels &quot;project_id&quot;, &quot;instance_id&quot;, and &quot;zone&quot;.
          &quot;a_key&quot;: &quot;A String&quot;,
        },
        &quot;type&quot;: &quot;A String&quot;, # Required. The monitored resource type. This field must match the type field of a MonitoredResourceDescriptor object. For example, the type of a Compute Engine VM instance is gce_instance. For a list of types, see Monitoring resource types (https://cloud.google.com/monitoring/api/resources) and Logging resource types (https://cloud.google.com/logging/docs/api/v2/resource-list).
      },
      &quot;state&quot;: &quot;A String&quot;, # Output only. The current state of the alert.
    },
  ],
  &quot;nextPageToken&quot;: &quot;A String&quot;, # If not empty, indicates that there may be more results that match the request. Use the value in the page_token field in a subsequent request to fetch the next set of results. The token is encrypted and only guaranteed to return correct results for 72 hours after it is created. If empty, all results have been returned.
  &quot;totalSize&quot;: 42, # The estimated total number of matching results for this query.
}</pre>
</div>

<div class="method">
    <code class="details" id="list_next">list_next()</code>
  <pre>Retrieves the next page of results.

        Args:
          previous_request: The request for the previous page. (required)
          previous_response: The response from the request for the previous page. (required)

        Returns:
          A request object that you can call &#x27;execute()&#x27; on to request the next
          page. Returns None if there are no more items in the collection.
        </pre>
</div>

</body></html>